package com.crane.oss.sports.bean.response.exerciseprescription;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author zx
 */
@Data
public class StudentPrescriptionResp implements Serializable {


    /**
     * bmiList : [{"level":"低体重","mark":"13.4"},{"level":"正常","mark":"13.5"},{"level":"正常","mark":"18.1"},{"level":"超重","mark":"18.2"},{"level":"肥胖","mark":"20.4"},{"level":"超重","mark":"20.3"}]
     * student : {"studentId":"496b68a01a4c41f688363c68d7c6c772","xsxm":"学生9","xsxb":1,"xssg":"127","xstz":"31.3","xh":"ysxx09","nationXh":null,"xsbh":"09","age":8,"birthDate":1396281600000,"phoneNumber":null,"classId":"f7e8cf8dd0174c07a565a63a3b0e0f4a","className":"1班","classShortName":null,"nj":1,"type":0,"sectionId":"xd0","sectionName":"小学","sectionShortName":"xx","sectionGrade":"小学1年级","campusName":"本校区","campusId":"fbc284072a40da84464d34c5483411bbce9fced71769e60043c0619b7d1820a689800ebf0b693a18be26986809da83f0e45a9ab30437b423","studentSchoolYear":"1577808000000","img":null}
     * prescription : {"xsxm":"学生9","age":8,"xsxb":1,"sg":"127","tz":"31.3","comment1":"身体质量指数BMI：19.4处于（>=18.2），表现为超重，需要多参加体育锻炼，增加能量消耗，同时注意饮食健康，尽量少使用热量较高的食物。","comment2":"由于平时缺乏体育锻炼，造成测试成绩均不合格，位于普通学生人群的中下水平，建议参加周期性的涉及的运动训练，以提高整体的身体素质。","statusChart":{"0":{"score":80,"itemName":"BMI:超重","level":"超重","mark":"19.4"},"1":{"score":90,"itemName":"肺活量:优秀","level":"优秀","mark":"1519"},"2":{"score":68,"itemName":"50米跑:及格","level":"及格","mark":"11.7"},"3":{"score":100,"itemName":"坐位体前屈:优秀","level":"优秀","mark":"17"},"4":{"score":100,"itemName":"1分钟跳绳:优秀","level":"优秀","mark":"201"}}}
     * analysis : {"sg":"127","tz":"31.3","bmiMark":"19.4","bmiScore":"80","bmiLevel":"超重","xsxm":"学生9","logo":null,"cycleName":"2021-2022学年国家体测","comment1":"学生9同学2021-2022学年国家体测国家体制健康测试中，总分为109分，等级为优秀，附加分20分，附加分测试项目为1分钟跳绳(4分)","comment2":"身体指数（BMI）为超重；肺活量、坐位体前屈、1分钟跳绳3项项目成绩反映了耐力素质、柔韧素质、灵敏协调素质相对较好，希望能够继续保持；","comment3":"根据体质测评结果，我们建议您采用以减脂为核心锻炼目标的运动处方方案，通过适度锻炼，达到减脂的目标，提高成绩，促进身体素质水平全面发展。","needPay":1,"isGenerate":1,"score":89,"addScore":20,"totalScore":109,"conditionAssessment":{"0":80,"1":90,"2":68,"3":100,"4":100},"itemData":{"0":[{"itemId":"11","score":"80","assessmentType":0,"itemName":"BMI","updateDate":1630575225856,"level":"超重","addScore":"0","itemUnit":"千克/米^2(kg/m^2)","weight":"0.15","mark":"19.4"}],"1":[{"itemId":"5","score":"90","assessmentType":1,"itemName":"肺活量","updateDate":1630575225858,"level":"优秀","addScore":"0","itemUnit":"毫升(ml)","weight":"0.15","mark":"1519"}],"2":[{"itemId":"4","score":"68","assessmentType":2,"itemName":"50米跑","updateDate":1630575225858,"level":"及格","addScore":"0","itemUnit":"秒(s)","weight":"0.20","mark":"11.7"}],"3":[{"itemId":"2","score":"100","assessmentType":3,"itemName":"坐位体前屈","updateDate":1630575225856,"level":"优秀","addScore":"0","itemUnit":"厘米(cm)","weight":"0.30","mark":"17"}],"4":[{"itemId":"8","score":"100","assessmentType":4,"itemName":"1分钟跳绳","updateDate":1636436510965,"level":"优秀","addScore":"20","itemUnit":"次","weight":"0.20","mark":"201"}]},"itemRule":{"2":"0","4":"12.6","5":"700","8":"17","11":"13.5-18.1"}}
     */

    private StudentBean student;
    private PrescriptionBean prescription;
    private AnalysisBean analysis;
    private List<BmiBean> bmiList;

    @Data
    public static class StudentBean implements Serializable {
        /**
         * studentId : 496b68a01a4c41f688363c68d7c6c772
         * xsxm : 学生9
         * xsxb : 1
         * xssg : 127
         * xstz : 31.3
         * xh : ysxx09
         * nationXh : null
         * xsbh : 09
         * age : 8
         * birthDate : 1396281600000
         * phoneNumber : null
         * classId : f7e8cf8dd0174c07a565a63a3b0e0f4a
         * className : 1班
         * classShortName : null
         * nj : 1
         * type : 0
         * sectionId : xd0
         * sectionName : 小学
         * sectionShortName : xx
         * sectionGrade : 小学1年级
         * campusName : 本校区
         * campusId : fbc284072a40da84464d34c5483411bbce9fced71769e60043c0619b7d1820a689800ebf0b693a18be26986809da83f0e45a9ab30437b423
         * studentSchoolYear : 1577808000000
         * img : null
         */

        private String studentId;
        private String xsxm;
        private int xsxb;
        private String xssg;
        private String xstz;
        private String xh;
        private Object nationXh;
        private String xsbh;
        private int age;
        private long birthDate;
        private Object phoneNumber;
        private String classId;
        private String className;
        private Object classShortName;
        private int nj;
        private int type;
        private String sectionId;
        private String sectionName;
        private String sectionShortName;
        private String sectionGrade;
        private String campusName;
        private String campusId;
        private String studentSchoolYear;
        private Object img;
    }


    @Data
    public static class ItemDataBean implements Serializable {
        /**
         * itemId : 11
         * score : 80
         * assessmentType : 0
         * itemName : BMI
         * updateDate : 1630575225856
         * level : 超重
         * addScore : 0
         * itemUnit : 千克/米^2(kg/m^2)
         * weight : 0.15
         * mark : 19.4
         */

        private String itemId;
        @ApiModelProperty(value = "分值", name = "score")
        private String score;
        @ApiModelProperty(value = "素质类型 1:有氧耐力,2:速度,3:柔韧,4:协调,5: 力量", name = "assessmentType")
        private int assessmentType;
        @ApiModelProperty(value = "名称", name = "itemName")
        private String itemName;
        private long updateDate;
        @ApiModelProperty(value = "级别", name = "level")
        private String level;
        private String addScore;
        @ApiModelProperty(value = "单位", name = "itemUnit")
        private String itemUnit;
        private String weight;
        @ApiModelProperty(value = "标记分值", name = "mark")
        private String mark;
    }



    @Data
    public static class StatusChart implements Serializable {
        /**
         * score : 80
         * itemName : BMI:超重
         * level : 超重
         * mark : 19.4
         */

        private int score;
        private String itemName;
        private String level;
        private String mark;
    }


    @Data
    public static class PrescriptionBean implements Serializable {
        /**
         * xsxm : 学生9
         * age : 8
         * xsxb : 1
         * sg : 127
         * tz : 31.3
         * comment1 : 身体质量指数BMI：19.4处于（>=18.2），表现为超重，需要多参加体育锻炼，增加能量消耗，同时注意饮食健康，尽量少使用热量较高的食物。
         * comment2 : 由于平时缺乏体育锻炼，造成测试成绩均不合格，位于普通学生人群的中下水平，建议参加周期性的涉及的运动训练，以提高整体的身体素质。
         * statusChart : {"0":{"score":80,"itemName":"BMI:超重","level":"超重","mark":"19.4"},"1":{"score":90,"itemName":"肺活量:优秀","level":"优秀","mark":"1519"},"2":{"score":68,"itemName":"50米跑:及格","level":"及格","mark":"11.7"},"3":{"score":100,"itemName":"坐位体前屈:优秀","level":"优秀","mark":"17"},"4":{"score":100,"itemName":"1分钟跳绳:优秀","level":"优秀","mark":"201"}}
         */

        private String xsxm;
        private int age;
        private int xsxb;
        private String sg;
        private String tz;
        @ApiModelProperty(value = "学生体质健康水平测定 左边", name = "comment1")
        private String comment1;
        @ApiModelProperty(value = "学生体质健康水平测定 右边", name = "comment2")
        private String comment2;
        @ApiModelProperty(value = "学生体质健康水平测定 报表", name = "statusChart")
        private List<StatusChart> statusChart;

    }

    @Data
    public static class AnalysisBean implements Serializable {
        /**
         * sg : 127
         * tz : 31.3
         * bmiMark : 19.4
         * bmiScore : 80
         * bmiLevel : 超重
         * xsxm : 学生9
         * logo : null
         * cycleName : 2021-2022学年国家体测
         * comment1 : 学生9同学2021-2022学年国家体测国家体制健康测试中，总分为109分，等级为优秀，附加分20分，附加分测试项目为1分钟跳绳(4分)
         * comment2 : 身体指数（BMI）为超重；肺活量、坐位体前屈、1分钟跳绳3项项目成绩反映了耐力素质、柔韧素质、灵敏协调素质相对较好，希望能够继续保持；
         * comment3 : 根据体质测评结果，我们建议您采用以减脂为核心锻炼目标的运动处方方案，通过适度锻炼，达到减脂的目标，提高成绩，促进身体素质水平全面发展。
         * needPay : 1
         * isGenerate : 1
         * score : 89
         * addScore : 20
         * totalScore : 109
         * conditionAssessment : {"0":80,"1":90,"2":68,"3":100,"4":100}
         * itemData : {"0":[{"itemId":"11","score":"80","assessmentType":0,"itemName":"BMI","updateDate":1630575225856,"level":"超重","addScore":"0","itemUnit":"千克/米^2(kg/m^2)","weight":"0.15","mark":"19.4"}],"1":[{"itemId":"5","score":"90","assessmentType":1,"itemName":"肺活量","updateDate":1630575225858,"level":"优秀","addScore":"0","itemUnit":"毫升(ml)","weight":"0.15","mark":"1519"}],"2":[{"itemId":"4","score":"68","assessmentType":2,"itemName":"50米跑","updateDate":1630575225858,"level":"及格","addScore":"0","itemUnit":"秒(s)","weight":"0.20","mark":"11.7"}],"3":[{"itemId":"2","score":"100","assessmentType":3,"itemName":"坐位体前屈","updateDate":1630575225856,"level":"优秀","addScore":"0","itemUnit":"厘米(cm)","weight":"0.30","mark":"17"}],"4":[{"itemId":"8","score":"100","assessmentType":4,"itemName":"1分钟跳绳","updateDate":1636436510965,"level":"优秀","addScore":"20","itemUnit":"次","weight":"0.20","mark":"201"}]}
         * itemRule : {"2":"0","4":"12.6","5":"700","8":"17","11":"13.5-18.1"}
         */

        private String sg;
        private String tz;
        @ApiModelProperty(value = "BMI百分比", name = "bmiMark")
        private String bmiMark;
        @ApiModelProperty(value = "BMI分值", name = "bmiScore")
        private String bmiScore;
        @ApiModelProperty(value = "BMI级别", name = "bmiLevel")
        private String bmiLevel;
        @ApiModelProperty(value = "学生姓名", name = "xsxm")
        private String xsxm;
        private Object logo;
        @ApiModelProperty(value = "体侧周期名称", name = "cycleName")
        private String cycleName;
        @ApiModelProperty(value = "成绩评论", name = "comment1")
        private String comment1;
        @ApiModelProperty(value = "BMI评论", name = "comment2")
        private String comment2;
        @ApiModelProperty(value = "国家体质健康测试成绩评论", name = "comment2")
        private String comment3;
        private int needPay;
        private int isGenerate;
        @ApiModelProperty(value = "附加分", name = "addScore")
        private int score;
        @ApiModelProperty(value = "附加分", name = "addScore")
        private int addScore;
        @ApiModelProperty(value = "总分", name = "totalScore")
        private int totalScore;
        @ApiModelProperty(value = "0:bmi  1:耐力素质  2:速度素质 3:柔韧素质 4:灵敏协调素质", name = "conditionAssessment")
        private Map<Integer,Integer> conditionAssessment;
        @ApiModelProperty(value = "国家体质健康测试成绩", name = "itemData")
        private Map<Integer,ItemDataBean> itemData;
        private Map<Integer,String> itemRule;

    }

    @Data
    public static class BmiBean implements Serializable {
        /**
         * level : 低体重
         * mark : 13.4
         */

        private String level;
        private String mark;
    }
}
